//页面加载完成后触发指定事件
function addLoadEvent(func){
    let oldonload = window.onload
    if(typeof window.onload != 'function'){
        window.onload = func
    }else{
        window.onload = function(){
            oldonload()
            func()
        }
    }
}